package com.dr.springboot.starter.enums;

import lombok.Data;
import lombok.Getter;

/**
 * Created by rui on 2018/7/25.
 */
//todo pattern 将所有的码值和对应的错误信息封装成枚举
@Getter
public enum ResultEnum {

    SUCCESS(200, "成功"),
    ERROR(500, "失败");

    private int code;
    private String message;

    ResultEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }
}
